import request from "@/utils/request"

// asin管理  列表
export const asinManagementList = (data) =>
  request({
    url: "/v1/base/asin-management/list",
    method: "post",
    data,
  })
// asin管理  新增
export const asinManagementCreate = (data) =>
  request({
    url: "/v1/base/asin-management/create",
    method: "post",
    data,
  })
// asin管理  修改
export const asinManagementEdit = (data) =>
  request({
    url: "/v1/base/asin-management/edit",
    method: "post",
    data,
  })

// asin管理  批量修改运输类型
export const asinManagementBatchUpdateField = (data) =>
  request({
    url: "/v1/base/asin-management/batch-update-a-field",
    method: "post",
    data,
  })
// asin管理  操作日志
export const asinManagementLog = (data) =>
  request({
    url: "/v1/base/asin-management/log",
    method: "post",
    data,
  })

// // asin管理  asin销量趋势
// export const asinManagementSalesTrend = (data) =>
//   request({
//     url: "/v1/base/asin-management/sales-trend",
//     method: "post",
//     data,
//   })



// // asin管理  XXXX
// export const amazonSkuDetail = (data) =>
//   request({
//     url: "/v1/goods/sku/amazon-sku-detail",
//     method: "post",
//     data,
//   })

// 库存周转天数目标配置 列表
export function stockingConfigList(params) {
  return request({
    url: `/v1/base/stocking-config/list`,
    method: "get",
    params,
  })
}

// 库存周转天数目标配置 新增
export const stockingConfigCreate = (data) =>
  request({
    url: "/v1/base/stocking-config/create",
    method: "post",
    data,
  })

// 库存周转天数目标配置 编辑
export const stockingConfigEdit = (data) =>
  request({
    url: "/v1/base/stocking-config/edit",
    method: "post",
    data,
  })

// 备货参数设置 保存
export const predictSalesSave = (data) =>
  request({
    url: "/v1/base/predict-sales/save",
    method: "post",
    data,
  })
// 备货参数配置 信息获取
export function predictSalesInfo(params) {
  return request({
    url: `/v1/base/predict-sales/info`,
    method: "get",
    params,
  })
}
// 备货参数配置 智能补货枚举值
export function predictSalesEnum(params) {
  return request({
    url: `/v1/base/predict-sales/enum`,
    method: "get",
    params,
  })
}

// 获取字段映射关系
export function getOption(params) {
  return request({
    url: `/v1/base/get-option`,
    method: "get",
    params,
  });
}

//获取下拉选项数据
export const overallOptions = (data) =>
  request({
    url: "/options",
    method: "post",
    data,
  });
